package com.lichuang.fruitvarietysm.goods.controller;


import com.lichuang.fruitvarietysm.goods.entity.GoodsEvalutateAppend;
import com.lichuang.fruitvarietysm.goods.mapper.GoodsEvaluateMapper;
import com.lichuang.fruitvarietysm.goods.mapper.GoodsEvalutateAppendMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author shuaihang
 * @since 2019-06-16
 */
@RestController
@RequestMapping("//goods-evalutate-append")
public class GoodsEvalutateAppendController {

    @Autowired
    GoodsEvalutateAppendMapper appendMapper;

    //进行追加评价
    @RequestMapping("/addAppendEvaluate")
    public Object addAppendEvaluate(GoodsEvalutateAppend goodsEvalutateAppend){
        String state;
       int count= appendMapper.insert(goodsEvalutateAppend);
       if(count==1){
           state="追加商品评论成功";
       }else {
           state="追加商品评论失败";
       }
       return state;
    }

}
